<template >
    <div class="recommend">          
        <p class="hots-title">热销推荐</p>
        <router-link tag="div" :to="'/detail/'+item.id"  class="recommend-item" v-for="item of recommend" :key="item.id">
            <img :src="item.imgUrl" alt="" >
            <div class="t-text">
                <h4>{{item.title}}</h4>
                <p>{{item.content}}</p>
                <button type="submit">查看详情</button>
            </div>
        </router-link>
        
    </div>
</template>
<script>
export default {
  name: "Recommend",
  props: {
    recommend: {
      type: Array
    }
  }
};
</script>
<style lang="scss" scoped>
.hots-title {
  line-height: 60px;
  background: #eee;
  padding: 20px;
}
.recommend-item {
  display: flex;
  padding: 30px;
  border-bottom: 1px solid #ccc;
  .t-text {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
  img {
    width: 150px;
    height: 150px;
    margin-right: 40px;
  }
  button {
    color: orange;
    background: #fff;
    outline: none;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 5px 10px;
    width: 150px;
  }
}
</style>